import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'

Vue.config.productionTip = false

// 1. 全局的样式
import './styles/index.scss'

// 2. 引入vant
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);
import { Lazyload } from 'vant'
Vue.use(Lazyload);

// 3. 全局的混入
import './common/mixins'

// 4. 全局的axios
import axios from 'axios'
Vue.prototype.$axios = axios;   // this.$axios = axios

// 5. 全局的EventBus 事件总线
const bus = new Vue()
Vue.prototype.$bus = bus;

// 6. 全局组件注册
import components from './components'
Vue.use(components)

// 7. cookies
import VueCookies from 'vue-cookies'
Vue.use(VueCookies)

// 8. 全局的过滤器 指令
import './utils/golbal'
// 根实例
new Vue({
  router,  // this.$router
  store,   // this.$store
  render: h => h(App)
}).$mount('#app')
